package oo_day01;
//汽车类
public class Car {
    //成员变量-----描述对象的属性
    String brand = null; //---品牌类
    String color = null; //---颜色类
    double price = 0.0; //---价格类
    int capacity = 0; //---载客量类

    //构造方法
    Car(){
    }
    Car(String brand1,String color1,double price1,int capacity1){
        this.brand = brand1;
        this.color = color1;
        this.price = price1;
        this.capacity = capacity1;
    }
    //方法------描述对象的行为
    void start(){
        System.out.println(this.brand+"牌子的"+this.color+"色的"+this.capacity+"座的"+this.price+"块钱的车启动了");
    }
    void run(){
        System.out.println(this.brand+"牌子的"+this.color+"色的"+this.capacity+"座的"+this.price+"块钱的车跑起来了");
    }
    void stop(){
        System.out.println(this.brand+"牌子的"+this.color+"色的"+this.capacity+"座的"+this.price+"块钱的车停下了");
    }
    void Stolen(){
        System.out.println(this.brand+"牌子的"+this.color+"色的"+this.capacity+"座的"+this.price+"块钱的车被偷了");
    }
}
